package org.dizena.modules.task.action;

import lombok.extern.slf4j.Slf4j;
import org.dizena.modules.master.bean.User;
import org.dizena.modules.master.service.UserService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Component("UserJob")
public class UserJob
{
    @Resource
    private UserService userService;

    public void deleteCancelUser()
    {
        List<User> list = userService.getCancelUser();
        list.forEach(m ->
        {
            userService.del(m.getId());
        });
    }

    public void deleteNoMobileUser()
    {
        List<User> list = userService.getUserNoMobile();
        list.forEach(m ->
        {
            userService.del(m.getId());
        });
    }

}
